package com.geeke.sys.entity;

import javax.validation.constraints.NotNull;
import com.geeke.common.persistence.DataEntity;
import com.geeke.sys.entity.User;
import com.geeke.sys.entity.Post;

/**
 * 用户岗位表Entity
 */
public class UserPost extends DataEntity<UserPost> {

    private static final long serialVersionUID = 1L;
    
    public UserPost() {
        super();
    }
    
    public UserPost(String id) {
        super(id);
    }

    @NotNull(message = "用户不能为空")
    private User user = new User(); // 用户
    public User getUser() {
        return user;
    }
    public void setUser(User user) {
        this.user = user;
    }

    @NotNull(message = "岗位不能为空")
    private Post post = new Post(); // 岗位
    public Post getPost() {
        return post;
    }
    public void setPost(Post post) {
        this.post = post;
    }


    private String remarks; // 备注
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    @Override
    public String getTableAlias() {
        return "userPost";
    }
} 